Q3FSRefStorage_Get |
( TQ3Status ) Q3FSRefStorage_Get ( TQ3StorageObject storage, FSRef *fr );
Find the FSRef associated with an FSRef storage object.
- storage
- The FSSpec storage object to examine.
- fr
- On output, a file reference.
Q3FSRefStorage_New |
( TQ3StorageObject ) Q3FSRefStorage_New ( const FSRef *fr );
Create a storage object associated with a Mac file reference.
Given a valid FSRef structure, Quesa creates a storage object.
The file should exist, but should not be open.
An FSSpec storage object is the same type of object as an FSRef
storage object, hence the FSRef and FSSpec storage APIs can be
used interchangeably.
- fr
- A valid file reference.
Q3FSRefStorage_Set |
( TQ3Status ) Q3FSRefStorage_Set ( TQ3StorageObject storage, const FSRef *fr );
Change the file reference for an FSRef storage object.
The storage must be closed at the time you call this.
- storage
- The FSRef storage object to modify.
- fr
- The new file reference.
Q3FSSpecStorage_Get |
( TQ3Status ) Q3FSSpecStorage_Get ( TQ3StorageObject storage, FSSpec *fs );
Find the FSSpec associated with an FSSpec storage object.
- storage
- The FSSpec storage object to examine.
- fs
- On output, a file system specification.
Q3FSSpecStorage_New |
( TQ3StorageObject ) Q3FSSpecStorage_New ( const FSSpec *fs );
Create a storage object associated with a Mac file specification.
Given a valid FSSpec structure, Quesa creates a storage object.
The file should exist, but should not be open.
An FSSpec storage object is the same type of object as an FSRef
storage object, hence the FSRef and FSSpec storage APIs can be
used interchangeably.
- fs
- A valid file system specification.
Q3FSSpecStorage_Set |
( TQ3Status ) Q3FSSpecStorage_Set ( TQ3StorageObject storage, const FSSpec *fs );
Change the file specification for an FSSpec storage object.
The storage must be closed at the time you call this.
- storage
- The FSSpec storage object to modify.
- fs
- The new file system specification.
Q3HandleStorage_Get |
( TQ3Status ) Q3HandleStorage_Get ( TQ3StorageObject storage, Handle *handle, TQ3Uns32 *validSize );
Get information about a Handle storage object.
- storage
- The storage object.
- handle
- On output, the Handle associated with the storage.
- validSize
- On output, the valid size in bytes of the storage.
Q3HandleStorage_New |
( TQ3StorageObject ) Q3HandleStorage_New ( Handle handle, TQ3Uns32 validSize );
Create a Handle storage object.
Create a storage object that stores data in a Macintosh memory Handle.
If you pass NULL for the Handle, Quesa internally allocates a
Handle of the given size, and disposes the Handle when the storage
object is disposed.
- handle
- An existing Handle, or NULL.
- validSize
- The size of the valid date in the given Handle, or the desired size if the Handle is NULL.
Q3HandleStorage_Set |
( TQ3Status ) Q3HandleStorage_Set ( TQ3StorageObject storage, Handle handle, TQ3Uns32 validSize );
Set information about a Handle storage object.
Sets the buffer location and size of a Handle storage object.
If you pass NULL for the Handle, Quesa internally allocates a
Handle of the given size, and disposes the Handle when the storage
object is disposed.
- storage
- The storage object.
- handle
- A Mac Handle to be associated with the storage, or NULL.
- validSize
- Size in bytes of the specified buffer.
Q3MacintoshStorage_Get |
( TQ3Status ) Q3MacintoshStorage_Get ( TQ3StorageObject storage, TQ3Int16 *fsRefNum );
Get the file reference number associated with the storage.
- storage
- The storage object.
- fsRefNum
- On output, the file reference number of the file associated with the storage.
Q3MacintoshStorage_GetType |
( TQ3ObjectType ) Q3MacintoshStorage_GetType ( TQ3StorageObject storage );
Get a derived type of a Mac storage object, currently either
kQ3MacintoshStorageTypeFSSpec or kQ3ObjectTypeInvalid.
- storage
- The storage object.
Q3MacintoshStorage_New |
( TQ3StorageObject ) Q3MacintoshStorage_New ( TQ3Int16 fsRefNum );
Create a Macintosh storage object.
This creates a storage object whose data is stored in a file,
specified by a Mac file reference number for an open file.
The specified file must remain open as long as you use the storage
object, and it is your responsibility to close the file later.
- fsRefNum
- A file reference number for an open data fork of a Mac file.
Q3MacintoshStorage_Set |
( TQ3Status ) Q3MacintoshStorage_Set ( TQ3StorageObject storage, TQ3Int16 fsRefNum );
Change the file reference number associated with a Mac storage.
This cannot be used when the storage is open.
- storage
- The storage object.
- fsRefNum
- A file reference number for an open data fork of a Mac file.
Q3MemoryStorage_GetBuffer |
( TQ3Status ) Q3MemoryStorage_GetBuffer ( TQ3StorageObject storage, unsigned char **buffer, TQ3Uns32 *validSize, TQ3Uns32 *bufferSize );
Get the data of a memory storage object.
Gets a pointer to the data of a memory storage object without copying.
The pointer may become invalid if later storage operations cause the
buffer to be reallocated.
Each of the output parameters may be NULL if you don't need that information.
- storage
- The storage object.
- buffer
- On output, receives a pointer to the actual data of the storage.
- validSize
- On output, the number of valid metafile data bytes in the storage object.
- bufferSize
- On output, the size of the buffer in bytes.
Q3MemoryStorage_GetType |
( TQ3ObjectType ) Q3MemoryStorage_GetType ( TQ3StorageObject storage );
Get the type of a memory storage object.
Returns the sub-type of a memory storage object,
currently either kQ3MemoryStorageTypeHandle or kQ3ObjectTypeInvalid.
- storage
- The storage object.
Q3MemoryStorage_New |
( TQ3StorageObject ) Q3MemoryStorage_New ( const unsigned char *buffer, TQ3Uns32 validSize );
Create a memory storage object.
Creates a memory storage object using memory that is maintained
internally by Quesa. If you pass a buffer of data, that data will be
copied to the storage object's private memory
- buffer
- Pointer to a buffer in memory, or NULL.
- validSize
- Number of bytes of data in the buffer. If you passed NULL for the buffer, this number serves as the initial size and grow size of the internally allocated buffer. If you passed NULL for buffer and 0 for validSize, then Quesa uses a default grow size.
Q3MemoryStorage_NewBuffer |
( TQ3StorageObject ) Q3MemoryStorage_NewBuffer ( unsigned char *buffer, TQ3Uns32 validSize, TQ3Uns32 bufferSize );
Create a memory storage object that uses a provided buffer.
Creates a memory storage object using a given buffer rather than by
allocating Quesa memory.
- buffer
- Pointer to a buffer of data, or NULL.
- validSize
- Number of bytes of valid data in the provided buffer, or if buffer was NULL, the initial size and grow size of an internally-allocated buffer.
- bufferSize
- Size in bytes of the buffer.
Q3MemoryStorage_Set |
( TQ3Status ) Q3MemoryStorage_Set ( TQ3StorageObject storage, const unsigned char *buffer, TQ3Uns32 validSize );
Sets the data of a memory storage object.
Writes data to a storage object by copying data from a buffer.
Whether or not the storage object owned its own memory before
this call (i.e., whether it was created with Q3MemoryStorage_New
or Q3MemoryStorage_NewBuffer), it will own its own memory afterward.
- storage
- The storage object.
- buffer
- Pointer to a buffer of data, or NULL.
- validSize
- Number of bytes to be copied from the buffer to the storage, or initial memory size if buffer was NULL.
Q3MemoryStorage_SetBuffer |
( TQ3Status ) Q3MemoryStorage_SetBuffer ( TQ3StorageObject storage, unsigned char *buffer, TQ3Uns32 validSize, TQ3Uns32 bufferSize );
Sets the data of a memory storage object.
Sets the data of a memory storage object to be stored in a
given buffer.
- storage
- The storage object.
- buffer
- Pointer to a buffer of data, or NULL.
- validSize
- Number of valid bytes in the buffer, or if the buffer is NULL, the initial and grow size of an internally allocated buffer.
- bufferSize
- Size in bytes of the buffer.
Q3PathStorage_Get |
( TQ3Status ) Q3PathStorage_Get ( TQ3StorageObject theStorage, char *pathName );
Finds the path associated with a path storage object.
The path returned by this function could be up to 1024 bytes long.
Be sure to allocate enough space for it.
This function is not available in QD3D.
- theStorage
- A path storage object.
- pathName
- On output, the path as a NULL-terminated string.
Q3PathStorage_New |
( TQ3StorageObject ) Q3PathStorage_New ( const char *pathName );
Creates a storage object of type kQ3StorageTypePath.
This type of storage is associated with a file specified by a path name,
and is intended to replace the poorly-named "Unix path" storage.
The exact format of permissible paths is platform-dependent. For example,
in a Mac version of Quesa built with the Metrowerks Standard Library,
the path is colon-separated and assumed to be in the system encoding.
This function is not available in QD3D.
- pathName
- A NULL-terminated pathname, as might be passed to fopen.
Q3PathStorage_Set |
( TQ3Status ) Q3PathStorage_Set ( TQ3StorageObject theStorage, const char *pathName );
Changes the path associated with a path storage object.
This function is not available in QD3D.
- theStorage
- A path storage object.
- pathName
- A NULL-terminated pathname.
Q3Storage_GetData |
( TQ3Status ) Q3Storage_GetData ( TQ3StorageObject storage, TQ3Uns32 offset, TQ3Uns32 dataSize, unsigned char *data, TQ3Uns32 *sizeRead );
Read some data from a storage object.
Returns some or all of the private data associated with a storage
object. If the storage is associated with a file object, then
the file must be open.
- storage
- The storage object.
- offset
- Starting offset of the data to be retrieved.
- dataSize
- Number of bytes of data to get.
- data
- Buffer to receive the data.
- sizeRead
- On output, number of bytes actually received.
Q3Storage_GetSize |
( TQ3Status ) Q3Storage_GetSize ( TQ3StorageObject storage, TQ3Uns32 *size );
Get the size of the data in a storage object.
Returns the number of bytes of data stored in the object.
If the storage is a type associated with a file, the file
must be open.
- storage
- The storage object.
- size
- On output, receives the size.
Q3Storage_GetType |
( TQ3ObjectType ) Q3Storage_GetType ( TQ3StorageObject storage );
Returns the type of a storage object.
Returns kQ3StorageTypeMemory, kQ3StorageTypeUnix, kQ3StorageTypeMacintosh,
or kQ3StorageTypeWin32, provided that the object is a storage object.
- storage
- The storage object to test.
Q3Storage_SetData |
( TQ3Status ) Q3Storage_SetData ( TQ3StorageObject storage, TQ3Uns32 offset, TQ3Uns32 dataSize, const unsigned char *data, TQ3Uns32 *sizeWritten );
Write some data to a storage object.
Write some data to a storage object, possibly extending the storage
to accommodate the new data. If the storage is associated with a file object, then
the file must be open.
- storage
- The storage object.
- offset
- The offset at which to begin writing new data.
- dataSize
- Number of bytes of data to be written.
- data
- Data to be written.
- sizeWritten
- On output, number of bytes actually written, normally the same as dataSize.
Q3UnixPathStorage_Get |
( TQ3Status ) Q3UnixPathStorage_Get ( TQ3StorageObject storage, char *pathName );
Get the path associated with a Unix path storage object
The path returned by this function could be up to 1024 bytes long.
Be sure to allocate enough space for it.
- storage
- A Unix path storage object.
- pathName
- On output, a NULL-terminated path.
Q3UnixPathStorage_New |
( TQ3StorageObject ) Q3UnixPathStorage_New ( const char *pathName );
Create a storage object associated with a file system path.
The Quesa extension Q3PathStorage_New may be used in place of this.
- pathName
- A NULL-terminated file system path.
Q3UnixPathStorage_Set |
( TQ3Status ) Q3UnixPathStorage_Set ( TQ3StorageObject storage, const char *pathName );
Change the path associated with a Unix path storage object.
- storage
- A Unix path storage object.
- pathName
- A NULL-terminated file system path.
Q3Win32Storage_Get |
( TQ3Status ) Q3Win32Storage_Get ( TQ3StorageObject storage, HANDLE *hFile );
Get the file handle for a Win32 storage object.
- storage
- The storage object to query.
- hFile
- Receives the file handle.
Q3Win32Storage_New |
( TQ3StorageObject ) Q3Win32Storage_New ( HANDLE hFile );
This creates a storage object whose data is stored in a file,
specified by a file HANDLE for an open file.
The specified file must remain open as long as you use the storage
object, and it is your responsibility to close the file later.
- hFile
- A valid file handle.
Q3Win32Storage_Set |
( TQ3Status ) Q3Win32Storage_Set ( TQ3StorageObject storage, HANDLE hFile );
Set the file handle for a Win32 storage object.
- storage
- The storage object to update.
- hFile
- The new file handle.
© 1999-2008 Quesa Developers (Last Updated 5/10/2008)