om_delete(3xom) — Subroutines
(c) Digital Equipment Corporation. 1994. All rights reserved.
Name
om_delete − Deletes a service-generated public object or makes a private object inaccessible.
Syntax
OM_return_code om_delete(subject)
| Argument | Data Type | Access |
| subject | OM_object | read |
| return_code | OM_return_code |
C Binding
OM_return_code om_delete(subject) OM_object subject
Arguments
SubjectThe object that you want the Service to delete. It must be a service-generated public object or a private object. If the object that you specify is a client-generated public object, the routine returns an error status.
Description
This routine deletes a service-generated public object, or makes a private object inaccessible.
When you apply this routine to a service-generated public object, the routine deletes the object and releases the resources associated with it. The resources include the space occupied by descriptors and attribute values. The routine also deletes all public subobjects of the subject. This routine does not delete private subobjects.
When you apply this routine to a private object, the routine makes the object inaccessible by making its Handle invalid. The routine also makes invalid the Handles of any private subobjects of the subject. Note that the effect of using an object’s Handle once it has been made invalid is undefined.
Return Values
| OM_SUCCESS | The routine has completed its task successfully |
| OM_FUNCTION_INTERRUPTED | The routine was aborted by external intervention |
| OM_MEMORY_INSUFFICIENT | There is not enough memory to complete the routine |
| OM_NETWORK_ERROR | The Service cannot use the underlying network |
| OM_NO_SUCH_OBJECT | You have specified a nonexistent object, or an invalid Handle for an object |
| OM_NO_SUCH_SYNTAX | There is an undefined syntax identifier |
| OM_NO_SUCH_TYPE | There is an undefined type identifier |
| OM_NOT_THE_SERVICES | There is a client-generated public object where there should be either a service-generated public object or a private object |
| OM_PERMANENT_ERROR | The Service encountered a permanent problem for which there is no defined error code |
| OM_POINTER_INVALID | An invalid pointer was supplied as a routine argument |
| OM_SYSTEM_ERROR | The Service cannot use the operating system |
| OM_TEMPORARY_ERROR | The Service encountered a temporary problem for which there is no defined error code |
Examples
The following example shows how to delete a service-generated public object of the X.500 class Entry-Info-Selection (info_select_copy). The object is a public copy of a private object of class Entry-Info-Selection info_select.
OM_return_code result;
OM_private_object info_select;
OM_object info_select_copy;
OM_value_position total_number;
result = om_get (info_select, /∗ object to be copied ∗/
OM_NO_EXCLUSIONS, /∗ no exclusions ∗/
NULL, /∗ ignored - no exclusions wanted ∗/
OM_FALSE,0,0, /∗ no trans into local char set ∗/
&info_select_copy,/∗ the copy ∗/
&total_number); /∗ number of attributes copied ∗/
/∗ Examine info_select_copy public object using C programming language
constructs ∗/
/∗ Delete object when finished with it ∗/
result = om_delete (info_select_copy); /∗ the object to be deleted ∗/