int tsmAllocReadNextTile ( TsmConnection connect, TsmTileHeader **tileHeader, uchar **tileBuffer )

Read the next tile from server

Documentation

Read the next tile from server.

This function performs the same action as tsmReadNextTile, except that it allocates the memory for the tile header and buffer inside the function. You must therefore pass pointers to the tile header/buffer pointers, so that the allocated memory addresses can be filled in for you. You free the memory that has been returned using the tsmFreeTileHeader and tsmFreeTileBuffer functions as usual.

If this function returns a value of FALSE or TSM_NODATA, then there is no memory to be freed, so always check the return code!

Using this function allows for future internal extensions to tsmApi that can efficiently cache a number of tile headers and buffers for you to use in a threaded application.

You can set the TSM_DONT_READ_TILES setting to TRUE using tsmSet and this function will perform no disk or network access. This may be useful for assessing your application's computational overhead.

Returns:
TRUE if all went well, FALSE if something nasty happened, or TSM_NODATA if we have read all tiles that were requested
Parameters:
connect - the dataset connection structure
tileHeader - a pointer to a pointer that will be set for you
tileBuffer - a pointer to a pointer that will be set for you
Author:
Martin Reddy
Version:
5 March 1998
See Also:
tsmTileReqBegin, tsmSet, tsmAllocTileHeader, tsmAllocTileBuffer


TSMAPI_RELEASE 2.1 - Release Date: 2001/01/10 19:01:12

Back to tsmApi Home Page