API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

PIM_IMESSAGESTORE_READMSG()

Brew Release
Brew MP 1.0.2
See Also
Error Codes pim_IMessageStore pim_IMessageStore_GetMsgIDsbyFolder
Description
Get the entire binary encoded OTA message and/or associated message attribute information in the attribute string for a given message ID. The returned attribute string preserves the original name-value pairs order when the message was added.
Params
pif
[in]:
Pointer to pim_IMessageStore interface.
nMsgID
[in]:
Message ID to identify the message in the store.
pMsg
[out]:
Pointer to a buffer used to store the message in OTA format.
nMsgLen
[in]:
Length of the message buffer in byte.
pnMsgLenReq
[out]:
The required buffer length to store the entire OTA message.
pMsgAttrStr
[out]:
Pointer to the attribute string buffer.
nMsgAttrStrLen
[in]:
The size of the attribute string buffer.
pMsgAttrStrLenReq
[out]:
The required size to store the entire attribute string.
Interface
Prototype
  •    AEEResult pim_IMessageStore_ReadMsg(pim_IMessageStore* pif, 
                                           pim_IMessageStore_MessageID nMsgID, 
                                           unsigned char* pMsg, 
                                           int nMsgLen, 
                                           int* pnMsgLenReq,
                                           char* pMsgAttrStr, 
                                           int nMsgAttrStrLen, 
                                           int* pMsgAttrStrLenReq);
                  
    
Return
  • AEE_SUCCESS : successful. pim_IMessageStore_EINVALIDMSGID : an invalid message ID is passed in. AEE_EWOULDBLOCK : the message store is blocked from reading a message. Other error code : indicating the nature of the failure.
Side Effect
  • None
Comments
None