Session
[MMS]


Detailed Description

Example:
Upon the reception of a new incoming envelope, check the MMS envelope specific property ALP_POSTAL_PROPERTY_ENVELOPE_MESSAGE_COMPLETE. This property indicates whether the attachements message has been downloaded already or not. If the message has not been downloaded, use the alp_postal_mms_session_receive_envelope API to retrieve the MMS content.
                // in your new handle notification function
                my_handle_notification_function(int cargc, char **cargv)
                {
                        AlpNotifyLaunch notifyLaunchParamDetails;
                        AlpPostalEnvelope envelope;
                        AlpPostalProperty* property;

                        alp_postal_envelope_init(&envelope);

                        cargc--; cargv++;
                        alp_notify_details(*cargv, &notifyLaunchParamDetails);
                
                        cargc--; cargv++;
                        // check if the notification type is new incoming envelope
                        if (strcmp(*cargv, ALP_NOTIFY_LAUNCH_TYPE ALP_NOTIFY_EVENT_POSTAL_MMS_ENVELOPE_NEW) == 0 )
                        {
                                AlpNotifyEventEnvelopeNew* envelopeNewEventP = (AlpNotifyEventEnvelopeNewIncoming*) &(notifyLaunchParamDetails.details);
                                if(envelopeNewEventP != NULL)
                                {
                                        //retrieve the corresponding envelope from the Postal database
                                        alp_postal_envelope_get(ALP_POSTAL_SERVICE_ID_MMS, envelopeNewEventP->envelopeId, ALP_POSTAL_ADDRESS_NONE_MASK, false, &envelope);

                                        // check if the content has not been downloaded
                                        alp_postal_envelope_get_property(&envelope, ALP_POSTAL_PROPERTY_ENVELOPE_MESSAGE_COMPLETE, &property);

                                        // if the message has not been downloaded retrieve the content from the MMSC
                                        alp_postal_mms_session_receive_envelope(yourCurrentSessionId, envelopeNewEventP->envelopeId, yourReceiveCallbackFunctionP);
                                        
                                }
                        }
                }

                // give the hand back to notify manager
                alp_notify_done(arg[], 0, 0);


Typedefs

typedef void(* AlpPostalMMSSessionReceiveEnvelopeAsyncReplyCallback )(alp_postal_session_id_t iSessiontId, alp_postal_envelope_id_t iReceivedEnvelopeId, AlpPostalProgressInfo *iProgressInfoP, alp_status_t iRequestResult)
 Postal MMS Session Receive Envelopes request async response Callback.
typedef void(* AlpPostalMMSSessionSendForwardRequestAsyncReplyCallback )(alp_postal_session_id_t iSessiontId, alp_postal_envelope_id_t iEnvelopeId, alp_status_t iRequestResult)
 Postal MMS Session Send Forward Request async response Callback.
typedef void(* AlpPostalMMSSessionSendReadReportAsyncReplyCallback )(alp_postal_session_id_t iSessiontId, alp_postal_envelope_id_t iEnvelopeId, alp_status_t iRequestResult)
 Postal MMS Session Send Read Report request async response Callback.

Functions

alp_status_t alp_postal_mms_session_cancel_forward_request (alp_postal_session_id_t iSessionId)
 Cancel a send forward request.
alp_status_t alp_postal_mms_session_cancel_receive_envelope (alp_postal_session_id_t iSessionId)
 Cancel a receive envelope request.
alp_status_t alp_postal_mms_session_cancel_send_read_report (alp_postal_session_id_t iSessionId)
 Cancel a send read report request.
alp_status_t alp_postal_mms_session_receive_envelope (alp_postal_session_id_t iSessionId, alp_postal_envelope_id_t iEnvelopeId, AlpPostalMMSSessionReceiveEnvelopeAsyncReplyCallback iCallbackFuncP)
 Try to retrieve a MMS envelope not yet downloaded (deferred retrieval) - async request.
alp_status_t alp_postal_mms_session_send_forward_request (alp_postal_session_id_t iSessionId, alp_postal_envelope_id_t iEnvelopeId, AlpPostalMMSSessionSendReadReportAsyncReplyCallback iCallbackFuncP)
 Try to send a forward request to a not downloaded envelope (ALP_POSTAL_PROPERTY_ENVELOPE_MESSAGE_COMPLETE = false) - async request.
alp_status_t alp_postal_mms_session_send_read_report (alp_postal_session_id_t iSessionId, alp_postal_envelope_id_t iEnvelopeId, AlpPostalMMSSessionSendReadReportAsyncReplyCallback iCallbackFuncP)
 Try to send a read report envelope - async request.


Typedef Documentation

typedef void(* AlpPostalMMSSessionReceiveEnvelopeAsyncReplyCallback)(alp_postal_session_id_t iSessiontId, alp_postal_envelope_id_t iReceivedEnvelopeId, AlpPostalProgressInfo *iProgressInfoP, alp_status_t iRequestResult)
 

Postal MMS Session Receive Envelopes request async response Callback.

Parameters:
[in] iSessionId The Postal Session id on which the request has been invoked.
[in] iReceivedEnvelopeId The Postal Envelope id of the received envelope, if its reception succeeded.
[in] iEnvProgressP The progression status for the envelope.
[in] iRequestResult The result of the request.

typedef void(* AlpPostalMMSSessionSendForwardRequestAsyncReplyCallback)(alp_postal_session_id_t iSessiontId, alp_postal_envelope_id_t iEnvelopeId, alp_status_t iRequestResult)
 

Postal MMS Session Send Forward Request async response Callback.

Parameters:
[in] iSessionId The Postal Session id on which the request has been invoked.
[in] iEnvelopeId The Forward Request Originating Postal Envelope id.
[in] iRequestResult The result of the request.

typedef void(* AlpPostalMMSSessionSendReadReportAsyncReplyCallback)(alp_postal_session_id_t iSessiontId, alp_postal_envelope_id_t iEnvelopeId, alp_status_t iRequestResult)
 

Postal MMS Session Send Read Report request async response Callback.

Parameters:
[in] iSessionId The Postal Session id on which the request has been invoked.
[in] iEnvelopeId The Read Report Originating Postal Envelope id.
[in] iRequestResult The result of the request.


Function Documentation

alp_status_t alp_postal_mms_session_cancel_forward_request alp_postal_session_id_t  iSessionId  ) 
 

Cancel a send forward request.

Parameters:
[in] iSessionId The session Id on which the request must be cancelled.
Returns:
Returns an error code.

alp_status_t alp_postal_mms_session_cancel_receive_envelope alp_postal_session_id_t  iSessionId  ) 
 

Cancel a receive envelope request.

Parameters:
[in] iSessionId The session Id on which the request must be cancelled.
Returns:
Returns an error code.

alp_status_t alp_postal_mms_session_cancel_send_read_report alp_postal_session_id_t  iSessionId  ) 
 

Cancel a send read report request.

Parameters:
[in] iSessionId The session Id on which the request must be cancelled.
Returns:
Returns an error code.

alp_status_t alp_postal_mms_session_receive_envelope alp_postal_session_id_t  iSessionId,
alp_postal_envelope_id_t  iEnvelopeId,
AlpPostalMMSSessionReceiveEnvelopeAsyncReplyCallback  iCallbackFuncP
 

Try to retrieve a MMS envelope not yet downloaded (deferred retrieval) - async request.

Parameters:
[in] iSessionId The session Id to work on.
[out] iEnvelopeId The Postal Envelope id to be retrieved.
[in] iCallbackFuncP The call back function to be called
Returns:
Returns an error code.

alp_status_t alp_postal_mms_session_send_forward_request alp_postal_session_id_t  iSessionId,
alp_postal_envelope_id_t  iEnvelopeId,
AlpPostalMMSSessionSendReadReportAsyncReplyCallback  iCallbackFuncP
 

Try to send a forward request to a not downloaded envelope (ALP_POSTAL_PROPERTY_ENVELOPE_MESSAGE_COMPLETE = false) - async request.

Parameters:
[in] iSessionId The session Id to work on.
[out] iEnvelopeId The Forward Request originating Postal Envelope id.
[in] iCallbackFuncP The call back function to be called
Returns:
Returns an error code.

alp_status_t alp_postal_mms_session_send_read_report alp_postal_session_id_t  iSessionId,
alp_postal_envelope_id_t  iEnvelopeId,
AlpPostalMMSSessionSendReadReportAsyncReplyCallback  iCallbackFuncP
 

Try to send a read report envelope - async request.

Parameters:
[in] iSessionId The session Id to work on.
[out] iEnvelopeId The Read report originating Postal Envelope id.
[in] iCallbackFuncP The call back function to be called
Returns:
Returns an error code.
Note:
the envelope property ALP_POSTAL_PROPERTY_ENVELOPE_READ_FLAG has to be set, by default the plugin send a read report as the message is read.


Generated on Wed Jul 30 07:06:42 2008 by Doxygen 1.4.6 for ALP SDK + Hiker Documentation

Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.