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

MQe_FieldsHelper_Msg.h File Reference

Helper APIs for manipulating MQe messages. More...


Functions

MQERETURN mqeFieldsHelper_unwrapMsg (MQeFieldsHndl hFields, MQeExceptBlock *pErrStruct, MQeFieldsHndl *phNewMsg, MQECONST MQeAttrBaseHndl hAttribute)
 Restore the embedded MQeMsg data into a new message, copying the origin QMgr name and timestamp fields in the wrapper into the new message, if they don't exist there.

MQERETURN mqeFieldsHelper_wrapMsg (MQeFieldsHndl hFields, MQeExceptBlock *pErrStruct, MQeFieldsHndl *phMessage)
 Dump a message into a new MQeFields, copying the origin QMgr name and time stamp fields into the new object if these exist. The result is a plain MQeFields!

MQERETURN mqeFieldsHelper_getMsgUidFields (MQeFieldsHndl hFields, MQeExceptBlock *pErrStruct, MQeFieldsHndl *phOutUID)
 Get an MQeFields that contains all the elements of the unique id (created after a message is put).

MQERETURN mqeFieldsHelper_deleteMsgUidFields (MQeFieldsHndl hFields, MQeExceptBlock *pErrStruct)
 Delete the UID fields of a message. This allows a message to be sent again.

MQERETURN mqeFieldsHelper_getMsgOriginQMgr (MQeFieldsHndl hFields, MQeExceptBlock *pErrStruct, MQeStringHndl *phOutQMgrName)
 Get the origin queue manager name of the message.

MQERETURN mqeFieldsHelper_getMsgTimeStamp (MQeFieldsHndl hFields, MQeExceptBlock *pErrStruct, MQEINT64 *pOutTimeStamp)
 Get the time when the message was put.


Detailed Description


Function Documentation

MQERETURN mqeFieldsHelper_unwrapMsg MQeFieldsHndl    hFields,
MQeExceptBlock   pErrStruct,
MQeFieldsHndl *    phNewMsg,
MQECONST MQeAttrBaseHndl    hAttribute
 

Parameters:
hFields  [in/out] handle for the MQeFields to be operated on.
pErrStruct  [in/out] pointer to a pre-allocated MQeExceptBlock structure.
phNewMsg  [in/out] pointer to output Handle.
hAttribute  [in] handle for attribute to use for unwrapping.
Precondition:
pErrStruct must point to a pre-allocated MQeExceptBlock structure.
Return values:
MQERETURN_OK 
  • Operation successful
MQERETURN_FIELDSHELPER_UNWRAP_MSG_FAIL 
  • MQEREASON_FIELDSHELPER_PUT_FAIL failed to put some new fields into *phNewMsg
MQERETURN_FIELDSHELPER_UNWRAP_MSG_FAIL 
  • MQEREASON_FIELDSHELPER_CHECK_FAIL could not check if some particular fields are already in *phNewMsg
MQERETURN_FIELDSHELPER_UNWRAP_MSG_FAIL 
  • MQEREASON_FIELDSHELPER_RESTORE_FAIL could not restore wrapped message
MQERETURN_FIELDSHELPER_UNWRAP_MSG_FAIL 
  • MQEREASON_FIELDSHELPER_SET_ATTR_FAIL failed to set attribute to hFields
MQERETURN_FIELDSHELPER_UNWRAP_MSG_FAIL 
  • MQEREASON_FIELDSHELPER_CREATE_FIELDS_FAIL could not create a new MQeFields
MQERETURN_FIELDSHELPER_UNWRAP_MSG_FAIL 
  • MQEREASON_FIELDSHELPER_GET_FAIL could not get some particular fields from hFields
MQERETURN_FIELDSHELPER_UNWRAP_MSG_FAIL 
  • MQEREASON_FIELDSHELPER_ALLOC_FAIL could not allocate memory

MQERETURN mqeFieldsHelper_wrapMsg MQeFieldsHndl    hFields,
MQeExceptBlock   pErrStruct,
MQeFieldsHndl *    phMessage
 

Parameters:
hFields  [in/out] handle for the MQeFields to be operated on.
pErrStruct  [in/out] pointer to a pre-allocated MQeExceptBlock structure.
phMessage  [in/out] pointer to output Handle.
Precondition:
pErrStruct must point to a pre-allocated MQeExceptBlock structure.
Return values:
MQERETURN_OK 
  • Operation successful
MQERETURN_FIELDSHELPER_WRAP_MSG_FAIL 
  • MQEREASON_FIELDSHELPER_PUT_FAIL failed to put some new fields into *phNewFields
MQERETURN_FIELDSHELPER_WRAP_MSG_FAIL 
  • MQEREASON_FIELDSHELPER_CREATE_FIELDS_FAIL could not create a new MQeFields
MQERETURN_FIELDSHELPER_WRAP_MSG_FAIL 
  • MQEREASON_FIELDSHELPER_DUMP_FAIL could not dump hFields
MQERETURN_FIELDSHELPER_WRAP_MSG_FAIL 
  • MQEREASON_FIELDSHELPER_ALLOC_FAIL could not allocate memory

MQERETURN mqeFieldsHelper_getMsgUidFields MQeFieldsHndl    hFields,
MQeExceptBlock   pErrStruct,
MQeFieldsHndl *    phOutUID
 

Parameters:
hFields  [in/out] handle for the MQeFields to be operated on.
pErrStruct  [in/out] pointer to a pre-allocated MQeExceptBlock structure.
phOutUID  [in/out] pointer to output Handle.
Precondition:
pErrStruct must point to a pre-allocated MQeExceptBlock structure.
Return values:
MQERETURN_OK 
  • Operation successful
MQERETURN_FIELDSHELPER_GET_MSG_UIDFIELDS_FAIL 
  • MQEREASON_FIELDSHELPER_GET_FAIL failed to get at least one of the UID components from hFields
MQERETURN_FIELDSHELPER_GET_MSG_UIDFIELDS_FAIL 
  • MQEREASON_FIELDSHELPER_PUT_FAIL could not put UID into *phOutUID
MQERETURN_FIELDSHELPER_GET_MSG_UIDFIELDS_FAIL 
  • MQEREASON_FIELDSHELPER_CREATE_FIELDS_FAIL could not create a new MQeFields
Warning:
If you invoke this function before a message has been put to a queue using mqeQueueManager_putMessage(), the operation will fail as the uid fields have not yet been added to the MQeFields comprising the message. The return code in this case is MQERETURN_FIELDSHELPER_GET_MSG_UIDFIELDS_FAIL, reason MQEREASON_FIELDSHELPER_GET_FAIL.

MQERETURN mqeFieldsHelper_deleteMsgUidFields MQeFieldsHndl    hFields,
MQeExceptBlock   pErrStruct
 

Parameters:
hFields  [in/out] handle for the MQeFields to be operated on.
pErrStruct  [in/out] pointer to a pre-allocated MQeExceptBlock structure.
Precondition:
pErrStruct must point to a pre-allocated MQeExceptBlock structure.
Return values:
MQERETURN_OK 
  • Operation successful

MQERETURN mqeFieldsHelper_getMsgOriginQMgr MQeFieldsHndl    hFields,
MQeExceptBlock   pErrStruct,
MQeStringHndl *    phOutQMgrName
 

Parameters:
hFields  [in/out] handle for the MQeFields to be operated on.
pErrStruct  [in/out] pointer to a pre-allocated MQeExceptBlock structure.
phOutQMgrName  [in/out] pointer to output Handle.
Precondition:
pErrStruct must point to a pre-allocated MQeExceptBlock structure.
Return values:
MQERETURN_OK 
  • Operation successful
MQERETURN_FIELDSHELPER_GET_MSG_ORGQMGR_FAIL 
  • MQEREASON_FIELDSHELPER_GET_FAIL failed to get the origin queue manager name.

MQERETURN mqeFieldsHelper_getMsgTimeStamp MQeFieldsHndl    hFields,
MQeExceptBlock   pErrStruct,
MQEINT64 *    pOutTimeStamp
 

Parameters:
hFields  [in/out] handle for the MQeFields to be operated on.
pErrStruct  [in/out] pointer to a pre-allocated MQeExceptBlock structure.
pOutTimeStamp  [in/out] pointer to output variable.
Precondition:
pErrStruct must point to a pre-allocated MQeExceptBlock structure.
Return values:
MQERETURN_OK 
  • Operation successful
MQERETURN_FIELDSHELPER_GET_MSG_TIMESTAMP_FAIL 
  • MQEREASON_FIELDSHELPER_GET_FAIL failed to get the message timestamp.


Generated Thu Aug 11 23:41:19 2005 for Websphere MQ Everyplace for Multiplatforms C Bindings Reference