TsmConnectionParams tsmParseReadArgs ( int argc, char **argv )

Create a set of read connection hints from command line

Documentation

Create a set of read connection hints from command line.

This function can be used to allow your programs to support a number of standard command line arguments for specifying preferences for opening a read connection.

The function will scan the provided command line looking for any supported arguments. It will build a TsmConnectionParams structure based upon the options that it finds and return this to you the client. This TsmConnectionParams structure can then be passed directly to tsmConnect when opening a connection.

You should free the memory used by the TsmConnectionParams structure when you are finished with it by calling tsmFreeParams().

For example, if this function finds an option called "-readjpeg" on the command line, it will insert an entry into the TsmConnectionParams structure to ask for a JPEG dataset. So when you use tsmConnect with this set of hints, it will try to open a JPEG version of the dataset.

The currently supported options that this function recognises are:

Returns:
An allocated TsmConnectionParams structure, or NULL if no supported options were found on the command line.
Parameters:
argc - the number of arguments passed to main()
argv - the array of command line strings passed to main()
Author:
Martin Reddy
Version:
10 March 1998
See Also:
tsmParseWriteArgs, tsmParseConnectArgs, tsmParseInitArgs, tsmDescribeArgs, tsmGetArg, tsmFreeParams


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

Back to tsmApi Home Page