home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
som30tk.zip
/
som30os2.zip
/
include
/
somtdm.idl
< prev
next >
Wrap
Text File
|
1996-12-24
|
4KB
|
99 lines
//-----------------------------------------------------------------------------
// ModuleName: SOMTDM
//
// Description: This module contians the idl description for the TypeCode
// based encoding/decoding functional interfaces.
//
// 25H7912 (C) Copyright International Business Machines Corp. 1994,1996
// All Rights Reserved
// Licensed Materials - Property of IBM
//
// US Government Users Restricted Rights - Use, duplication or disclosure
// restricted by GSA ADP Schedule Contract with IBM Corp.
//-----------------------------------------------------------------------------
#ifndef __TypecodeDataManipulator_IDL__
#define __TypecodeDataManipulator_IDL__
#include <somobj.idl>
#include <principl.idl>
/*
* tc_encode
* Encodes the input "src" data of any CORBA TypeCode into an ASCII
* data buffer in "encode_buf". The "encode_buf" is allocated by
* tc_encode. Callers are responsible to call SOMFree to deallocate
* its memory. tc_encode returns the actual size of the encoded
* data in bytes to the caller.
* NOTE: The encoded data buffer contains ASCII characters and
* embedded NULLs; hence its length cannot be determined by strlen();
* the returned length should always be used instead.
*
* tc_decode
* Decodes the input "src" TypeCode data which is a flat
* ASCII data string and stores the decoded TypeCode data in
* "decode_buf". The "decode_buf" is allocated by "tc_decode".
* Callers must use tc_free to deallocate its memory.
* The length returned is that part of the input "src" buffer
* used in the decoding. Unless the src buffer contains more
* than a single encoded TypeCode, this length should match that
* returned by tc_encode when the TypeCode was originally encoded.
*
* tc_decode_contents:
* Like tc_decode, except that the top-level "decode_buf" must be
* provided by the user. Deeper levels will be allocated just as
* in tc_decode.
*
* tc_copy
* Makes a "deep" copy of any CORBA TypeCode passed to it.
* The "dest" buffer is allocated by tc_copy.
* Callers must use tc_free to deallocate its memory.
*
* tc_copy_contents
* Makes a "deep" copy of any CORBA TypeCode passed to it.
* The "dest" buffer is assumed to be provided by the caller.
* Deeper levels will be allocated just as in tc_copy.
*
* tc_equal
* Compares two TypeCode data buffers. If "buf1" and "buf2" are equal,
* return TRUE. Otherwise return FALSE.
*
* tc_free
* Frees all element space in TypeCode data buffers generated by
* calls to tc_decode or tc_copy.
*
* tc_free_contents
* Frees all element space in TypeCode data buffers generated by
* calls to tc_decode_contents. Ie, all space EXCEPT top-level
* buffer space is freed.
*
*/
interface TypecodeDataManipulator : SOMObject
{
#ifdef __SOMIDL__
implementation {
passthru C_h = "#include <principl.h>";
passthru C_ih = "#include <principl.h>";
unsigned long buffer_size; /* buffer size */
unsigned long buffer_remaining; /* Free buffer size */
somToken somtdm_mutex;
callstyle=idl;
dllname="somu2.dll";
releaseorder:
tc_encode, tc_decode, tc_decode_contents,
tc_copy, tc_copy_contents, tc_equal,
tc_free, tc_free_contents, tc_init, tc_test;
// override: somInit;
override: somDefaultInit;
override: somDestruct;
};
#endif /* __SOMIDL__ */
};
#endif /* __TypecodeDataManipulator_IDL__ */