NAME ReadUMSConfig -- Read something from the global configuration. SYNOPSIS string = ReadUMSConfig( login, tags ) D0 D2 D3 STRPTR ReadUMSConfig( LONG, struct TagIten * ); string = ReadUMSConfigTags( login, tag1, ... ) STRPTR ReadUMSConfigTags( LONG, ULONG, ... ); FUNCTION Read a config object from the global UMS configuration. Whenever possible, applications should use the global UMS configuration and this function instead of extra config-files. A 'config-string' is a null-terminated string identified by an unique name. Similar to shell- and environment-variables config-strings can be global (same for all users) or local (only visible to a certain user). Other config-objects are 'users' (with aliases and local strings), 'akas' and 'netgroups'. In order not to mix up config-strings of different applications, their names should have the id of the application and a dot prepended. E.g. "fido.outbound", "fido.inbound", "uucp.uuspool", "magicmail.publicScreenName", etc. The MBP enforces this convention by not accepting config elements without a dot ("."). Names for config elements are case-insensitive. This function buffers the returned string until it is freed with FreeUMSConfig() or (UMSLogout()). INPUTS The following tags are allowed: CfgGlobalOnly : (none) read just global config-elements, ignore local ones. CfgUser : STRPTR read config elements local to another user. You must specify the name of the other user here. This contradicts CfgGlobalOnly! CfgMatchPattern : STRPTR (Not yet implemented in V9.) Only search for config elements that match a given pattern. The following tags are mutually exclusive. Use exactly one of them. CfgName : STRPTR read a config-string with given name. CfgUserName : STRPTR get the 'realname' for a user with a given alias. CfgNextVar : STRPTR get the name of the next config variable. This allows you to scan all existing variables. On first invocation you set the tag's data to NULL and get the name of the first var. Then you always set it to what has been returned on the last call. When NULL is returned, you're finished. Can (but needn't) be combined with tag CfgGlobalOnly or tag CfgUser. CfgSameNetgroup : STRPTR (Not yet implemented in V9) get the next groupname for the same netgroup. Any number of groupnames may be configured as identical 'netgroups'. Using this tag you can get another name for the same 'netgroup' as the given groupname. Using this tag repeatedly you can cycle trough all names for the same group. Because these are organized in a circular structure you must do a string-compare with the original string to detect when you are finished. This returns NULL only when the given string doesn't indicate a netgroup. CfgNextNetgroup : STRPTR CfgNextUser : STRPTR CfgNextAlias : STRPTR (Not yet implemented in V9) These tags allow you to scan all existing configuration objects. On first invocation you set the tag's data to NULL and get the name of the first element. Then you always set it to what has been returned on the last call. When NULL is returned, you're finished. You may use CfgUser together with CfgNextAlias and CfgNextString. CfgGlobalOnly is redundant as it's the default. RESULT string - a pointer to the desired config element, or NULL. BUGS Some of the tags are not implemented yet (as indicated). Tell the author (Martin Horneffer) when you need them! SEE ALSO FreeUMSConfig(), WriteUMSConfig()


converted with guide2html by Kochtopf