Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ om_encode(3exom) — X.500 3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

om_encode(3exom)  —  Subroutines

 
 
 
 
 
 
 
 
 
 

 
(c) Digital Equipment Corporation. 1994. All rights reserved.

 
 

Name

om_encode − Creates a new private object that encodes an existing private object. 
 
 
 
 
 

Syntax

OM_return_code om_encode(original, rules, encoding)
 

 
original@OM_private_object@T{ read T} rules@OM_object_identifier@T{ read T} encoding@OM_private_object@T{ write T} return_code@T{ OM_return_code T}  

 
 
 
 
 
 

C Binding

 
 
OM_return_code om_encode(original, rules, encoding)
 
 
 
OM_private_object original,
 
OM_object_identifier rules,
 
OM_private_object #encoding
 
 
 
 
 
 
 
 
 

Arguments

 
 
 

Original
 
The object you want to encode.
 
 

Rules
 
The set of rules that the Service must follow to produce an encoding. In this version of the OM API, you can only specify ASN.1 BER.
 
 

Encoding
 
An object that is the encoded version of the original. The Service creates this object in the workspace in which the original is located. The Service returns this argument if the Return Code of the function is OM_SUCCESS. The returned object is an instance of the Encoding class.
 
 
 
 

Description

 
 
This function creates a new private object, the encoding, which exactly and independently encodes an existing private object, the original.
 

 
When you apply this function to a private object, the function uses the encoding rules you specify to create a new private object. The new encoded private object is independent of the original private object.
 
 
 
 
 
 
 
 

Return Values

 
 
 
 

The function has completed its task successfully T} OM_FUNCTION_DECLINED@T{ The function does not apply to the object to which it is addressed T} OM_FUNCTION_INTERRUPTED@T{ The function was aborted by external intervention T} OM_MEMORY_INSUFFICIENT@T{ There is not enough memory to complete the function T} OM_NETWORK_ERROR@T{ The Service cannot use the underlying network T} OM_NO_SUCH_OBJECT@T{ You have specified a nonexistent object, or an invalid Handle for an object T} OM_NO_SUCH_RULES@T{ There is an undefined rules identifier T} OM_NOT_PRIVATE@T{ There is a public object where there should be a private object T} OM_PERMANENT_ERROR@T{ The Service encountered a permanent problem for which there is no defined error code T} OM_POINTER_INVALID@T{ An invalid pointer was supplied as a function argument T} OM_SYSTEM_ERROR@T{ The Service cannot use the operating system T} OM_TEMPORARY_ERROR@T{ The Service encountered a temporary problem for which there is no defined error code T}  

 
 
 
 
 
 
 
 
 
 
 

Examples

 
 
 
 
The following example shows the encoding of an object of the MH class Report (encodable_object). The object is encoded according to the rules OM_BER, and the encoded object is encoding. 
 

Exhibit 0-0.

 
OM_return_code      result;
 
OM_private_object   encodable_object,
                    encoding;
 
     result = om_encode (encodable_object,
                             /∗ object to be encoded ∗/
                         OM_BER,
                             /∗ encoding rules ∗/
                         &encoding);
                             /∗ encoded object ∗/
 

 
 
 
 
 
 
 
 
 
 
 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026