[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 1

odm_mount_class Subroutine

Purpose

Retrieves the class symbol structure for the specified object class name.

Library

Object Data Manager Library (libodm.a)

Syntax

#include <odmi.h>
CLASS_SYMBOL odm_mount_class (ClassName)
char *ClassName;

Description

The odm_mount_class subroutine retrieves the class symbol structure for a specified object class. The subroutine can be called by applications (for example, the ODM commands) that have no previous knowledge of the structure of an object class before trying to access that class. The odm_mount_class subroutine determines the class description from the object class header information and creates a CLASS_SYMBOL object class that is returned to the caller.

The object class is not opened by the odm_mount_class subroutine. Calling the subroutine subsequent times for an object class that is already open or mounted returns the same CLASS_SYMBOL object class.

Mounting a class that links to another object class recursively mounts to the linked class. However, if the recursive mount is unsuccessful, the original odm_mount_class subroutine does not fail; the CLASS_SYMBOL object class is set up with a null link.

Parameters

ClassName Specifies the name of an object class from which to retrieve the class description.

Return Values

Upon successful completion, a CLASS_SYMBOL is returned. If the odm_mount_class subroutine is unsuccessful, a value of -1 is returned and the odmerrno variable is set to an error code.

Error Codes

Failure of the odm_mount_class subroutine sets the odmerrno variable to one of the following error codes:

ODMI_BAD_CLASSNAME
                          The specified object class name does not match the object class name in the file. Check path name and permissions.
ODMI_BAD_CLXNNAME
                          The specified collection name does not match the collection name in the file.
ODMI_CLASS_DNE
                          The specified object class does not exist. Check path name and permissions.
ODMI_CLASS_PERMS
                          The object class cannot be opened because of the file permissions.
ODMI_CLXNMAGICNO_ERR
                          The specified collection is not a valid object class collection.
ODMI_INVALID_CLASS
                          The specified file is not an object class.
ODMI_INVALID_CLXN
                          Either the specified collection is not a valid object class collection or the collection does not contain consistent data.
ODMI_MAGICNO_ERR
                          The class symbol does not identify a valid object class.
ODMI_MALLOC_ERR
                          Cannot allocate sufficient storage. Try again later or contact the person responsible for the system.
ODMI_OPEN_ERR
                          Cannot open the object class. Check path name and permissions.
ODMI_PARAMS
                          The parameters passed to the subroutine were not correct. Make sure there are the correct number of parameters and that they are valid.
ODMI_TOOMANYCLASSES
                          Too many object classes have been accessed. An application can only access less than 1024 object classes.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The odm_create_class subroutine.

List of ODM Commands and Subroutines.

Object Data Manager (ODM) Overview for Programmers in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Contents | Glossary | Home | Search ]