Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

MQe_AttrBase.h File Reference


Detailed Description

The MQeAttrBase API header file for native code base.

The native attribute interface currently consists of three different structure and function collections: MQeAttrBase, MQeFieldsAttr, and MQeMsgAttr. You can only create MQeFieldsAttr and MQeMsgAttr structures as MQeAttrBase is hidden. MQeMsgAttr is a subclass of MQeFieldsAttr and MQeFieldsAttr is a subclass of MQeAttrBase.

The MQeAttrBase consists of a set of methods which are applicable to all attribute structures. They are mainly getters and setters and polymorphic entry points to functions implemented in subclasses (eg., free, encodeData, and decodeData). Callers should use the polymorphic entry points to access subclass implemented methods.

The MQeFieldsAttr consists of functions which are appropriate when an attribute is to be attached to an MQeFields structure and its extension. It allows the caller to encode/decode an MQeFields item when it is dumped/restored.

The MQeMsgAttr is basically a different implementation of MQeMAttribute. Its behaviour is slightly different from the MQeMAttribute of the Java code base (which is to be modified). Check the MQeMsgAttr documentation for details.


Functions

MQERETURN mqeAttrBase_free (MQeAttrBaseHndl hAttrBase, MQeExceptBlock *pErrStruct)
 frees (polymorphic entry point) the MQeAttrBase handle hAttrBase

MQERETURN mqeAttrBase_decodeData (MQeAttrBaseHndl hAttrBase, MQeExceptBlock *pErrStruct, MQEBYTE *pBuffer, MQEINT32 *pBufLength, MQEBYTE *pData, MQEINT32 length)
 This function (polymorphic entry point) decrypts and/or decompresses the bytes referenced by pData of length length.

MQERETURN mqeAttrBase_decodeDataToDynBuf (MQeAttrBaseHndl hAttrBase, MQeExceptBlock *pErrStruct, MQeDynamicBufferHndl hOutput, MQEBYTE *pData, MQEINT32 length)
 This function (polymorphic entry point) decrypts and/or decompresses the bytes referenced by pData of length length into a dynamic buffer.

MQERETURN mqeAttrBase_encodeData (MQeAttrBaseHndl hAttrBase, MQeExceptBlock *pErrStruct, MQEBYTE *pBuffer, MQEINT32 *pBufLength, MQEBYTE *pData, MQEINT32 length)
 This function (polymorphic entry point) encrypts and/or compresses the bytes referenced by pData of length length.

MQERETURN mqeAttrBase_encodeDataToDynBuf (MQeAttrBaseHndl hAttrBase, MQeExceptBlock *pErrStruct, MQeDynamicBufferHndl hOutput, MQEBYTE *pData, MQEINT32 length)
 This function (polymorphic entry point) encrypts and/or compresses the bytes referenced by pData of length length into a dynamic buffer.

MQERETURN mqeAttrBase_setKey (MQeAttrBaseHndl hAttrBase, MQeExceptBlock *pErrStruct, MQeKeyHndl hKey)
 Set key for the MQeAttrBase pointed to by hAttrBase. It frees the original key, if there is one.

MQERETURN mqeAttrBase_getKey (MQeAttrBaseHndl hAttrBase, MQeExceptBlock *pErrStruct, MQeKeyHndl *phKey)
 Get the key from the MQeAttrBase pointed to by hAttrBase.

MQERETURN mqeAttrBase_getAuthenticatorName (MQeAttrBaseHndl hAttrBase, MQeExceptBlock *pErrStruct, MQeStringHndl *phAuthenticator)
 Get the name of the authenticator installed in the MQeAttrBase pointed to by hAttrBase.

MQERETURN mqeAttrBase_getCryptorName (MQeAttrBaseHndl hAttrBase, MQeExceptBlock *pErrStruct, MQeStringHndl *phCryptor)
 Get the name of the cryptor installed in the MQeAttrBase pointed to by hAttrBase.

MQERETURN mqeAttrBase_getCompressorName (MQeAttrBaseHndl hAttrBase, MQeExceptBlock *pErrStruct, MQeStringHndl *phCompressor)
 Get the name of the compressor installed in the MQeAttrBase pointed to by hAttrBase.

MQERETURN mqeAttrBase_close (MQeAttrBaseHndl hAttrBase, MQeExceptBlock *pErrStruct)
 close hAttrBase.


Function Documentation

MQERETURN mqeAttrBase_free MQeAttrBaseHndl    hAttrBase,
MQeExceptBlock   pErrStruct
 

frees (polymorphic entry point) the MQeAttrBase handle hAttrBase

Parameters:
hAttrBase  [in] Handle for the MQeAttrBase to be freed
pErrStruct  [in/out] Pointer to a pre-allocated MQeExceptBlock structure
Precondition:
pErrStruct points to a pre-allocated MQeExceptBlock structure (no error information is returned if pErrStruct is null).
Return values:
errors  returned by mqeCryptor_free, mqeCompressor_free, mqeAuthenticator_free, mqeKey_free and supplied plugin free functions.
other  common error codes caused by invalid supplied parameters
Note:
This function also frees the key, compressor, cryptor, and authenticator attached to the attribute.

MQERETURN mqeAttrBase_decodeData MQeAttrBaseHndl    hAttrBase,
MQeExceptBlock   pErrStruct,
MQEBYTE *    pBuffer,
MQEINT32 *    pBufLength,
MQEBYTE *    pData,
MQEINT32    length
 

This function (polymorphic entry point) decrypts and/or decompresses the bytes referenced by pData of length length.

Deprecated:
Parameters:
hAttrBase  [in] Handle for the MQeAttrBase to be operated on
pErrStruct  [in/out] Pointer to a pre-allocated MQeExceptBlock structure
pBuffer  [in/out] Pointer to output buffer
pBufLength  [in/out] Pointer to buffer ((*pBuffer) ) length variable
pData  [in] Pointer to a byte array to be decrypted and/or decompressed
length  [in] Number of bytes in the data array to be decoded
Precondition:
hAttrBase must not be NULL.
pErrStruct points to a pre-allocated MQeExceptBlock structure (no error information is returned if pErrStruct is null).
Returns :
pBuffer and pBufLength:
 * ---------------------- ---------------- -------------------------------- -------------------------
 * initial (*pBufLength)  initial pBuffer  returned (*pBufLength)           returned pBuffer
 * ---------------------- ---------------- -------------------------------- -------------------------
 * 0                      any              buffer size (in bytes) required  not defined
 * any                    NULL             ditto                            ditto
 * != 0                   != NULL          buffer space used (in bytes)     points to the result
 * 
Return values:
errors  returned by plugin decodeData functions
other  common error codes caused by invalid supplied parameters

MQERETURN mqeAttrBase_decodeDataToDynBuf MQeAttrBaseHndl    hAttrBase,
MQeExceptBlock   pErrStruct,
MQeDynamicBufferHndl    hOutput,
MQEBYTE *    pData,
MQEINT32    length
 

This function (polymorphic entry point) decrypts and/or decompresses the bytes referenced by pData of length length into a dynamic buffer.

Parameters:
hAttrBase  [in] Handle for the MQeAttrBase to be operated on
pErrStruct  [in/out] Pointer to a pre-allocated MQeExceptBlock structure
hOutput  [in/out] output dynamic buffer handle
pData  [in] Pointer to a byte array to be decrypted and/or decompressed
length  [in] Number of bytes in the data array to be decoded
Precondition:
hAttrBase must not be NULL.
pErrStruct points to a pre-allocated MQeExceptBlock structure (no error information is returned if pErrStruct is null).
Return values:
errors  returned by plugin decodeData functions
other  common error codes caused by invalid supplied parameters

MQERETURN mqeAttrBase_encodeData MQeAttrBaseHndl    hAttrBase,
MQeExceptBlock   pErrStruct,
MQEBYTE *    pBuffer,
MQEINT32 *    pBufLength,
MQEBYTE *    pData,
MQEINT32    length
 

This function (polymorphic entry point) encrypts and/or compresses the bytes referenced by pData of length length.

Deprecated:
Parameters:
hAttrBase  [in] Handle for the MQeAttrBase to be operated on
pErrStruct  [in/out] Pointer to a pre-allocated MQeExceptBlock structure
pBuffer  [in/out] Pointer to output buffer
pBufLength  [in/out] Pointer to buffer ((*pBuffer) ) length variable
pData  [in] Pointer to a byte array to be encrypted and/or compressed
length  [in] Number of bytes in the data array to be encoded
Precondition:
hAttrBase must not be NULL.
pErrStruct points to a pre-allocated MQeExceptBlock structure (no error information is returned if pErrStruct is null).
Returns :
pBuffer and pBufLength:
 * ---------------------- ---------------- -------------------------------- -------------------------
 * initial (*pBufLength)  initial pBuffer  returned (*pBufLength)           returned pBuffer
 * ---------------------- ---------------- -------------------------------- -------------------------
 * 0                      any              buffer size (in bytes) required  not defined
 * any                    NULL             ditto                            ditto
 * != 0                   != NULL          buffer space used (in bytes)     points to the result
 * 
Return values:
errors  returned by plugin encodeData functions
other  common error codes caused by invalid supplied parameters

MQERETURN mqeAttrBase_encodeDataToDynBuf MQeAttrBaseHndl    hAttrBase,
MQeExceptBlock   pErrStruct,
MQeDynamicBufferHndl    hOutput,
MQEBYTE *    pData,
MQEINT32    length
 

This function (polymorphic entry point) encrypts and/or compresses the bytes referenced by pData of length length into a dynamic buffer.

Parameters:
hAttrBase  [in] Handle for the MQeAttrBase to be operated on
pErrStruct  [in/out] Pointer to a pre-allocated MQeExceptBlock structure
hOutput  [in/out] output dynamic buffer handle
pData  [in] Pointer to a byte array to be encrypted and/or compressed
length  [in] Number of bytes in the data array to be encoded
Precondition:
hAttrBase must not be NULL.
pErrStruct points to a pre-allocated MQeExceptBlock structure (no error information is returned if pErrStruct is null).
Return values:
errors  returned by plugin encodeData functions
other  common error codes caused by invalid supplied parameters

MQERETURN mqeAttrBase_setKey MQeAttrBaseHndl    hAttrBase,
MQeExceptBlock   pErrStruct,
MQeKeyHndl    hKey
 

Set key for the MQeAttrBase pointed to by hAttrBase. It frees the original key, if there is one.

Parameters:
hAttrBase  [in] the MQeAttrBase to be used.
pErrStruct  [in/out] pointer to a pre-allocated MQeExceptBlock structure.
hKey  [in] key handle to be used.
Precondition:
pErrStruct must not be NULL.
Return values:
MQERETURN_OK 
  • Operation successful
MQERETURN_S_ATTRBASE_SETKEY_FAIL 
  • MQEREASON_ATTRBASE_ILLEGAL_KEY hKey is not a MQeKey
other 
  • other common error codes caused by invalid supplied parameters

MQERETURN mqeAttrBase_getKey MQeAttrBaseHndl    hAttrBase,
MQeExceptBlock   pErrStruct,
MQeKeyHndl *    phKey
 

Get the key from the MQeAttrBase pointed to by hAttrBase.

Parameters:
hAttrBase  [in] the MQeAttrBase to be used.
pErrStruct  [in/out] pointer to a pre-allocated MQeExceptBlock structure.
phKey  [in] pointer to the returned key handle.
Precondition:
pErrStruct must not be NULL.
Return values:
MQERETURN_OK 
  • Operation successful
other 
  • other common error codes caused by invalid supplied parameters

MQERETURN mqeAttrBase_getAuthenticatorName MQeAttrBaseHndl    hAttrBase,
MQeExceptBlock   pErrStruct,
MQeStringHndl *    phAuthenticator
 

Get the name of the authenticator installed in the MQeAttrBase pointed to by hAttrBase.

Parameters:
hAttrBase  [in] the MQeAttrBase to be used.
pErrStruct  [in/out] pointer to a pre-allocated MQeExceptBlock structure.
phAuthenticator  [in/out] pointer to the output handle variable.
Precondition:
pErrStruct must not be NULL.
Return values:
MQERETURN_OK 
  • Operation successful
other 
  • other common error codes caused by invalid supplied parameters

MQERETURN mqeAttrBase_getCryptorName MQeAttrBaseHndl    hAttrBase,
MQeExceptBlock   pErrStruct,
MQeStringHndl *    phCryptor
 

Get the name of the cryptor installed in the MQeAttrBase pointed to by hAttrBase.

Parameters:
hAttrBase  [in] the MQeAttrBase to be used.
pErrStruct  [in/out] pointer to a pre-allocated MQeExceptBlock structure.
phCryptor  [in/out] pointer to the output handle variable.
Precondition:
pErrStruct must not be NULL.
Return values:
MQERETURN_OK 
  • Operation successful
other 
  • other common error codes caused by invalid supplied parameters

MQERETURN mqeAttrBase_getCompressorName MQeAttrBaseHndl    hAttrBase,
MQeExceptBlock   pErrStruct,
MQeStringHndl *    phCompressor
 

Get the name of the compressor installed in the MQeAttrBase pointed to by hAttrBase.

Parameters:
hAttrBase  [in] the MQeAttrBase to be used.
pErrStruct  [in/out] pointer to a pre-allocated MQeExceptBlock structure.
phCompressor  [in/out] pointer to the output handle variable.
Precondition:
pErrStruct must not be NULL.
Return values:
MQERETURN_OK 
  • Operation successful
other 
  • other common error codes caused by invalid supplied parameters

MQERETURN mqeAttrBase_close MQeAttrBaseHndl    hAttrBase,
MQeExceptBlock   pErrStruct
 

close hAttrBase.

Parameters:
hAttrBase  [in] the MQeAttrBase to be used.
pErrStruct  [in/out] pointer to a pre-allocated MQeExceptBlock structure.
Precondition:
pErrStruct must not be NULL.
Return values:
MQERETURN_OK 
  • Operation successful
MQERETURN_S_ATTRBASE_CLOSE_FAIL 
  • MQEREASON_ATTRBASE_AUTHENTICATORCLOSE_FAIL failed to close authenticator
other 
  • other common error codes caused by invalid supplied parameters


Generated Thu Aug 11 23:27:09 2005 for Websphere MQ Everyplace for Multiplatforms C Programming Reference